package com.bee.bootstrap.organization.entity;

import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import lombok.Data;

import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author liekkas
 * @since 2018-05-25
 */
@TableName("base_organization")
@Data
public class Organization extends Model<Organization> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
	@TableId(value="id", type= IdType.ID_WORKER)
	private Long id;
    /**
     * 组织名称
     */
	private String name;
    /**
     * 组织编码
     */
	private String code;
    /**
     * 显示顺序
     */
	private Integer priority;
    /**
     * 父主键
     */
	@TableField("parent_id")
	private Long parentId;
    /**
     * 完整的父主键路径
     */
	@TableField("full_parent_ids")
	private String fullParentIds;
    /**
     * 状态
     */
	private String status;
    /**
     * 创建时间
     */
	@TableField("create_time")
	private Date createTime;
    /**
     * 有效时间
     */
	@TableField("update_time")
	private Date updateTime;

	@Override
	protected Serializable pkVal() {
		return this.id;
	}

}
